package org.jeecg.modules.car.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.entity.car.CarMerchantDerate;
import org.jeecg.modules.car.entity.CarMerchant;

import java.util.List;

/**
 * @Description: 商户优惠券
 * @Author: jeecg-boot
 * @Date:   2020-10-22
 * @Version: V1.0
 */
public interface ICarMerchantDerateService extends IService<CarMerchantDerate> {

    void add(CarMerchantDerate carMerchantDerate, CarMerchant carMerchant);

    void editDerate(CarMerchantDerate carMerchantDerate, CarMerchant carMerchant);

    Result delDerate(CarMerchant carMerchant, String derateId);

    Result batchDelDerate(List<String> derateIds);

    List<CarMerchantDerate> findPage(Page<CarMerchantDerate> page, CarMerchantDerate carMerchantDerate);

    CarMerchantDerate getByPlateStatus(String plate, Integer status);

    void updateUseStatus(String derateId,Integer oldStatus,Integer newStatus,Integer usedNumber);

    List<CarMerchantDerate> derateList(Page<CarMerchantDerate> page, CarMerchantDerate carMerchantDerate);

    void addDerate(CarMerchantDerate carMerchantDerate, CarMerchant carMerchant);

}
